﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Frame.Pages;
using DevExpress.Web.ASPxEditors;

public partial class ConsumerManage_ViewDetailConsumer : Frame.Pages.BasePage
{

    protected override  void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        if (!IsPostBack && !IsCallback)
        {
            if (RefrenceContext<DAL.BI_Consumer>.Current != null)
            {
                //Backlink.NavigateUrl = (RefrenceContext<DAL.BI_Consumer>.Current == null ? string.Empty : RefrenceContext<DAL.BI_Consumer>.Current.BackUrl);
                
                WebUtility.MappingConsumerView(Detailpanel, RefrenceContext<DAL.BI_Consumer>.Current.Model);
                RefrenceContext<DAL.BI_Consumer>.Current.BackUrl = "~/ConsumerManage/ViewDetailConsumer.aspx";
            }
            
        }

    }

    protected override string ActionID
    {
        get { return "0"; }
    }
    protected void btn_Click(object sender, EventArgs e)
    {
        ASPxButton lb = sender as ASPxButton;
        switch (lb.CommandName)
        {
            case "Point":
                {
                    Response.Redirect("~/BLIInfo/EditConsumerIntegral.aspx");
                    break;
                }
            case "Analysis":
                {
                    Response.Redirect("~/AnalysisReport/ConsumerSpendingHabits.aspx");
                    break;
                }
            case "Return":
                {
                    Response.Redirect("~/BLIInfo/EditReturnVisit.aspx");
                    break;
                }
            case "His":
                {
                    Response.Redirect("~/ConsumerManage/EditConsumerHis.aspx");
                    break;
                }
            case "Book":
                {
                    Response.Redirect("~/ConsumerManage/EditConsumerBook.aspx");
                    break;
                }
            default:
                break;
        }
    }
}